One of conventionally known control systems for this type of a vending machine is a system, which includes controlled apparatuses each equipped with a terminal control apparatus, and a main control apparatus connected to the terminal control apparatuses via a communication line. The controlled apparatus here refers to a device controlled by the main control apparatus and includes, for example, a display apparatus to display the sum of money deposited, a product carrying-out apparatus to control carrying-out of products and a coin identification apparatus to identify the authenticity and type of coins deposited, etc.
In this control system, the main control apparatus supervises and controls all terminal control apparatuses. On the other hand, each terminal control apparatus individually controls its controlled apparatus based on the contents of communication with the main control apparatus. Each terminal control apparatus is equipped with a calculation apparatus, a storage apparatus, a controlled apparatus and an input/output apparatus, etc. and operates based on a control program stored in the storage apparatus.
By the way, this type of control system sometimes needs to renew the control program stored in the storage apparatus of the terminal control apparatus due to changes to the specification. In such a case, the storage apparatus is conventionally replaced with a new one. More specifically, this replacement work consists of removing a ROM, the storage apparatus, and mounting a new ROM storing a new control program.
However, such replacement work not only takes time and trouble but also is likely to involve trouble that the ROM pins are folded and damaged. Especially, the terminal control apparatuses are provided together with the controlled apparatuses and these controlled apparatuses are distributed in different places of the vending machine according to their respective functions. For this reason, replacing the storage apparatus of a terminal control apparatus installed in a place with poor workability takes considerable time and trouble. Furthermore, when storage apparatuses corresponding to a plurality of terminal apparatuses are replaced at a time, those storage apparatuses need to be replaced one by one. This not only takes considerable time and trouble but also involves a possibility that storage apparatuses may be mistaken for other apparatuses.
Such being the case, a control system is proposed which uses an electrically rewritable EEPROM as a storage apparatus of the terminal control apparatus. In this control system, each terminal control apparatus is provided with a connecting apparatus capable of connecting a detachable portable memory card and each terminal control apparatus is provided with a rewriting program. Then, a memory card in which a new control program is pre-stored is inserted into the connecting apparatus and the rewriting program is executed, and in this way the control program stored in the storage apparatus is replaced with a new one stored in the memory card. This method can update the control program relatively easily without requiring any troublesome operation like replacement of ROM. However, this control system still cannot solve the last problem described above.
It is an object of the present invention to provide a vending machine control system capable of easily and reliably rewriting a control program of each terminal control apparatus.
To attain this object, the present invention provides a control system for vending machine comprises a terminal control apparatus that controls controlled apparatuses of the vending machine and a main control apparatus that is connected with the terminal control apparatus via a transmission path and controls the terminal control apparatus through communication with the terminal control apparatus, wherein the main control apparatus includes transferring means for transferring a control program for the terminal control apparatus and a rewriting program to rewrite the control program to the terminal control apparatus via a transmission path, and the terminal control apparatus includes first storing means for storing the control program for the controlled apparatuses, second storing means for storing the rewriting program and rewriting program receiving and executing means for storing the rewriting program received from the main control apparatus in the second storing means and executing the rewriting program, the rewriting program executed by the rewriting program receiving and executing means receives the control program from the main control apparatus and rewrites the control program stored in the first storing means with the control program received from the main control apparatus.
According to the present invention, when a control program of the terminal control apparatus is rewritten, once the rewriting program is transferred from the main control apparatus to the terminal control apparatus, the rewriting program is executed by the rewriting program receiving/executing means of the terminal control apparatus. Then, a new control program is transferred from the main control apparatus according to the rewriting program and the control program stored in the first storing means is rewritten to the new control program. Thus, it is possible to easily and reliably update the control program without being influenced by the installation location of the terminal control apparatus. Moreover, since the rewriting program is transferred from the main control apparatus, the control program can be rewritten reliably even if the specification, etc. of the control program is modified.
The objects, configurations and effects other than those described above will become more apparent from the following detailed explanations.